//
//  WelcomeViewController.m
//  SinaWeibo
//
//  Created by Apple on 16/8/12.
//  Copyright © 2016年 Apple. All rights reserved.
//

#import "WelcomeViewController.h"
#import "MainViewController.h"
#import "WelcomeBackViewController.h"

@interface WelcomeViewController ()

@end

@implementation WelcomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}


//点击开始旅程按钮
- (IBAction)clickStart:(UIButton *)sender {
    //1.创建主界面控制器
//    MainViewController *mainVC = [[MainViewController alloc]init];

#warning 错误的。
    //2.跳转到主控制器.
//    [self presentViewController:mainVC animated:YES completion:nil];
    
#warning 应该是切换窗口的根控制器
//    UIWindow *window = [UIApplication sharedApplication].keyWindow;
//    window.rootViewController = mainVC;
    
    //1.创建欢迎界面控制器
    WelcomeBackViewController *welcomeBackVC = [[WelcomeBackViewController alloc]init];
    
    UIWindow *window = [UIApplication sharedApplication].keyWindow;
    window.rootViewController = welcomeBackVC;
    
    
}

@end
